package com.lingkun.demo.sys.mapper;

import com.lingkun.demo.sys.entity.UserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lingkun.demo.sys.entity.sysVo.roleByUserId;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 小龙
 * @since 2021-04-24
 */
public interface UserRoleMapper extends BaseMapper<UserRole> {

    @Select("SELECT aa.role_id  roleId,aa.role_desc roleDesc,aa.role_name roleName,bb.user_id UserId  from sys_role aa right  OUTER JOIN  user_role bb  on aa.role_id =bb.role_id")
    List<roleByUserId> roleByUserId();
}
